3.2.6 \(\int \frac {-a+b \cot (c+d x)}{(a+b \cot (c+d x))^{5/2}} \, dx\) [106]

Optimal. Leaf size=174 \[ -\frac {(i a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{(a-i b)^{5/2} d}+\frac {(i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{(a+i b)^{5/2} d}-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}-\frac {2 b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^2 d \sqrt {a+b \cot (c+d x)}} \]

[Out]

-(I*a-b)*arctanh((a+b*cot(d*x+c))^(1/2)/(a-I*b)^(1/2))/(a-I*b)^(5/2)/d+(I*a+b)*arctanh((a+b*cot(d*x+c))^(1/2)/
(a+I*b)^(1/2))/(a+I*b)^(5/2)/d-4/3*a*b/(a^2+b^2)/d/(a+b*cot(d*x+c))^(3/2)-2*b*(3*a^2-b^2)/(a^2+b^2)^2/d/(a+b*c
ot(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.26, antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3610, 3620, 3618, 65, 214} \begin {gather*} -\frac {2 b \left (3 a^2-b^2\right )}{d \left (a^2+b^2\right )^2 \sqrt {a+b \cot (c+d x)}}-\frac {4 a b}{3 d \left (a^2+b^2\right ) (a+b \cot (c+d x))^{3/2}}-\frac {(-b+i a) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{d (a-i b)^{5/2}}+\frac {(b+i a) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{d (a+i b)^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-a + b*Cot[c + d*x])/(a + b*Cot[c + d*x])^(5/2),x]

[Out]

-(((I*a - b)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a - I*b]])/((a - I*b)^(5/2)*d)) + ((I*a + b)*ArcTanh[Sqrt[a
 + b*Cot[c + d*x]]/Sqrt[a + I*b]])/((a + I*b)^(5/2)*d) - (4*a*b)/(3*(a^2 + b^2)*d*(a + b*Cot[c + d*x])^(3/2))
- (2*b*(3*a^2 - b^2))/((a^2 + b^2)^2*d*Sqrt[a + b*Cot[c + d*x]])

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3610

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b
*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3620

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {-a+b \cot (c+d x)}{(a+b \cot (c+d x))^{5/2}} \, dx &=-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}+\frac {\int \frac {-a^2+b^2+2 a b \cot (c+d x)}{(a+b \cot (c+d x))^{3/2}} \, dx}{a^2+b^2}\\ &=-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}-\frac {2 b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^2 d \sqrt {a+b \cot (c+d x)}}+\frac {\int \frac {-a \left (a^2-3 b^2\right )+b \left (3 a^2-b^2\right ) \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx}{\left (a^2+b^2\right )^2}\\ &=-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}-\frac {2 b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^2 d \sqrt {a+b \cot (c+d x)}}-\frac {(a-i b) \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx}{2 (a+i b)^2}-\frac {(a+i b) \int \frac {1+i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}} \, dx}{2 (a-i b)^2}\\ &=-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}-\frac {2 b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^2 d \sqrt {a+b \cot (c+d x)}}+\frac {(i a-b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \cot (c+d x)\right )}{2 (a-i b)^2 d}-\frac {(i a+b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \cot (c+d x)\right )}{2 (a+i b)^2 d}\\ &=-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}-\frac {2 b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^2 d \sqrt {a+b \cot (c+d x)}}+\frac {(a+i b) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \cot (c+d x)}\right )}{b (i a+b)^2 d}+\frac {(i (i a+b)) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \cot (c+d x)}\right )}{(a+i b)^2 b d}\\ &=-\frac {(i a-b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{(a-i b)^{5/2} d}+\frac {(i a+b) \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{(a+i b)^{5/2} d}-\frac {4 a b}{3 \left (a^2+b^2\right ) d (a+b \cot (c+d x))^{3/2}}-\frac {2 b \left (3 a^2-b^2\right )}{\left (a^2+b^2\right )^2 d \sqrt {a+b \cot (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 6.19, size = 232, normalized size = 1.33 \begin {gather*} \frac {(-a+b \cot (c+d x)) \left (\frac {3 i \left ((a+i b)^{7/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )-(a-i b)^{7/2} \tanh ^{-1}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )\right ) (a+b \cot (c+d x))^{5/2}}{(a-i b)^{5/2} (a+i b)^{5/2}}-\frac {2 b (a+b \cot (c+d x)) \left (-11 a^3+a b^2+\left (-9 a^2 b+3 b^3\right ) \cot (c+d x)\right )}{\left (a^2+b^2\right )^2}\right ) \sin (c+d x)}{3 d (a+b \cot (c+d x))^{5/2} (-b \cos (c+d x)+a \sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-a + b*Cot[c + d*x])/(a + b*Cot[c + d*x])^(5/2),x]

[Out]

((-a + b*Cot[c + d*x])*(((3*I)*((a + I*b)^(7/2)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a - I*b]] - (a - I*b)^(7
/2)*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[a + I*b]])*(a + b*Cot[c + d*x])^(5/2))/((a - I*b)^(5/2)*(a + I*b)^(5
/2)) - (2*b*(a + b*Cot[c + d*x])*(-11*a^3 + a*b^2 + (-9*a^2*b + 3*b^3)*Cot[c + d*x]))/(a^2 + b^2)^2)*Sin[c + d
*x])/(3*d*(a + b*Cot[c + d*x])^(5/2)*(-(b*Cos[c + d*x]) + a*Sin[c + d*x]))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1181\) vs. \(2(150)=300\).
time = 0.65, size = 1182, normalized size = 6.79 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(5/2),x,method=_RETURNVERBOSE)

[Out]

-2/d*b*(1/(a^2+b^2)^2*(1/4/(a^2+b^2)^(3/2)/b^2*(1/2*(-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^5+2*(2*(
a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3*b^2+3*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a*b^4+(2*(a^
2+b^2)^(1/2)+2*a)^(1/2)*a^6-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4*b^2-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2*b^4+(2
*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^6)*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b
^2)^(1/2))+2*(-8*a^5*b^2+8*a*b^6-1/2*(-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^5+2*(2*(a^2+b^2)^(1/2)+
2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3*b^2+3*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a*b^4+(2*(a^2+b^2)^(1/2)+2*
a)^(1/2)*a^6-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4*b^2-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2*b^4+(2*(a^2+b^2)^(1/2
)+2*a)^(1/2)*b^6)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*cot(d*x+c))^(1/2
)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)))+1/4/(a^2+b^2)^(3/2)/b^2*(-1/2*(-(2*(a^2+b^2)^
(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^5+2*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3*b^2+3*(2*(a^2+b^2)^(1
/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a*b^4+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^6-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4*b^2
-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^2*b^4+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^6)*ln((a+b*cot(d*x+c))^(1/2)*(2*(a^2+
b^2)^(1/2)+2*a)^(1/2)-b*cot(d*x+c)-a-(a^2+b^2)^(1/2))+2*(8*a^5*b^2-8*a*b^6+1/2*(-(2*(a^2+b^2)^(1/2)+2*a)^(1/2)
*(a^2+b^2)^(1/2)*a^5+2*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3*b^2+3*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(
a^2+b^2)^(1/2)*a*b^4+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^6-5*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4*b^2-5*(2*(a^2+b^2)^
(1/2)+2*a)^(1/2)*a^2*b^4+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*b^6)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-
2*a)^(1/2)*arctan(((2*(a^2+b^2)^(1/2)+2*a)^(1/2)-2*(a+b*cot(d*x+c))^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))))-(-
3*a^2+b^2)/(a^2+b^2)^2/(a+b*cot(d*x+c))^(1/2)+2/3/(a^2+b^2)*a/(a+b*cot(d*x+c))^(3/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(5/2),x, algorithm="maxima")

[Out]

integrate((b*cot(d*x + c) - a)/(b*cot(d*x + c) + a)^(5/2), x)

________________________________________________________________________________________

Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(5/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {a}{a^{2} \sqrt {a + b \cot {\left (c + d x \right )}} + 2 a b \sqrt {a + b \cot {\left (c + d x \right )}} \cot {\left (c + d x \right )} + b^{2} \sqrt {a + b \cot {\left (c + d x \right )}} \cot ^{2}{\left (c + d x \right )}}\, dx - \int \left (- \frac {b \cot {\left (c + d x \right )}}{a^{2} \sqrt {a + b \cot {\left (c + d x \right )}} + 2 a b \sqrt {a + b \cot {\left (c + d x \right )}} \cot {\left (c + d x \right )} + b^{2} \sqrt {a + b \cot {\left (c + d x \right )}} \cot ^{2}{\left (c + d x \right )}}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))**(5/2),x)

[Out]

-Integral(a/(a**2*sqrt(a + b*cot(c + d*x)) + 2*a*b*sqrt(a + b*cot(c + d*x))*cot(c + d*x) + b**2*sqrt(a + b*cot
(c + d*x))*cot(c + d*x)**2), x) - Integral(-b*cot(c + d*x)/(a**2*sqrt(a + b*cot(c + d*x)) + 2*a*b*sqrt(a + b*c
ot(c + d*x))*cot(c + d*x) + b**2*sqrt(a + b*cot(c + d*x))*cot(c + d*x)**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a+b*cot(d*x+c))/(a+b*cot(d*x+c))^(5/2),x, algorithm="giac")

[Out]

integrate((b*cot(d*x + c) - a)/(b*cot(d*x + c) + a)^(5/2), x)

________________________________________________________________________________________

Mupad [B]
time = 16.17, size = 2500, normalized size = 14.37 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(a - b*cot(c + d*x))/(a + b*cot(c + d*x))^(5/2),x)

[Out]

(log(((-(4*a^7*d^2 - (320*a^6*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*
d^4)^(1/2) + 20*a^3*b^4*d^2 - 40*a^5*b^2*d^2)/(a^10*d^4 + b^10*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b
^4*d^4 + 5*a^8*b^2*d^4))^(1/2)*((a + b*cot(c + d*x))^(1/2)*(320*a^6*b^14*d^3 - 16*a^2*b^18*d^3 + 1024*a^8*b^12
*d^3 + 1440*a^10*b^10*d^3 + 1024*a^12*b^8*d^3 + 320*a^14*b^6*d^3 - 16*a^18*b^2*d^3) - ((-(4*a^7*d^2 - (320*a^6
*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*d^4)^(1/2) + 20*a^3*b^4*d^2 -
 40*a^5*b^2*d^2)/(a^10*d^4 + b^10*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b^4*d^4 + 5*a^8*b^2*d^4))^(1/2
)*(((-(4*a^7*d^2 - (320*a^6*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*d^
4)^(1/2) + 20*a^3*b^4*d^2 - 40*a^5*b^2*d^2)/(a^10*d^4 + b^10*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b^4
*d^4 + 5*a^8*b^2*d^4))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(64*a*b^22*d^5 + 640*a^3*b^20*d^5 + 2880*a^5*b^18*d^5
+ 7680*a^7*b^16*d^5 + 13440*a^9*b^14*d^5 + 16128*a^11*b^12*d^5 + 13440*a^13*b^10*d^5 + 7680*a^15*b^8*d^5 + 288
0*a^17*b^6*d^5 + 640*a^19*b^4*d^5 + 64*a^21*b^2*d^5))/4 - 32*a*b^21*d^4 - 160*a^3*b^19*d^4 - 128*a^5*b^17*d^4
+ 896*a^7*b^15*d^4 + 3136*a^9*b^13*d^4 + 4928*a^11*b^11*d^4 + 4480*a^13*b^9*d^4 + 2432*a^15*b^7*d^4 + 736*a^17
*b^5*d^4 + 96*a^19*b^3*d^4))/4))/4 + 16*a^4*b^15*d^2 + 96*a^6*b^13*d^2 + 240*a^8*b^11*d^2 + 320*a^10*b^9*d^2 +
 240*a^12*b^7*d^2 + 96*a^14*b^5*d^2 + 16*a^16*b^3*d^2)*(-(4*a^7*d^2 - (320*a^6*b^8*d^4 - 16*a^4*b^10*d^4 - 176
0*a^8*b^6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*d^4)^(1/2) + 20*a^3*b^4*d^2 - 40*a^5*b^2*d^2)/(a^10*d^4 + b^1
0*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b^4*d^4 + 5*a^8*b^2*d^4))^(1/2))/4 - log(16*a^4*b^15*d^2 - (-(
4*a^7*d^2 - (320*a^6*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*d^4)^(1/2
) + 20*a^3*b^4*d^2 - 40*a^5*b^2*d^2)/(16*a^10*d^4 + 16*b^10*d^4 + 80*a^2*b^8*d^4 + 160*a^4*b^6*d^4 + 160*a^6*b
^4*d^4 + 80*a^8*b^2*d^4))^(1/2)*((a + b*cot(c + d*x))^(1/2)*(320*a^6*b^14*d^3 - 16*a^2*b^18*d^3 + 1024*a^8*b^1
2*d^3 + 1440*a^10*b^10*d^3 + 1024*a^12*b^8*d^3 + 320*a^14*b^6*d^3 - 16*a^18*b^2*d^3) + (-(4*a^7*d^2 - (320*a^6
*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*d^4)^(1/2) + 20*a^3*b^4*d^2 -
 40*a^5*b^2*d^2)/(16*a^10*d^4 + 16*b^10*d^4 + 80*a^2*b^8*d^4 + 160*a^4*b^6*d^4 + 160*a^6*b^4*d^4 + 80*a^8*b^2*
d^4))^(1/2)*(896*a^7*b^15*d^4 - (-(4*a^7*d^2 - (320*a^6*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^6*d^4 + 1600*a^
10*b^4*d^4 - 400*a^12*b^2*d^4)^(1/2) + 20*a^3*b^4*d^2 - 40*a^5*b^2*d^2)/(16*a^10*d^4 + 16*b^10*d^4 + 80*a^2*b^
8*d^4 + 160*a^4*b^6*d^4 + 160*a^6*b^4*d^4 + 80*a^8*b^2*d^4))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(64*a*b^22*d^5 +
 640*a^3*b^20*d^5 + 2880*a^5*b^18*d^5 + 7680*a^7*b^16*d^5 + 13440*a^9*b^14*d^5 + 16128*a^11*b^12*d^5 + 13440*a
^13*b^10*d^5 + 7680*a^15*b^8*d^5 + 2880*a^17*b^6*d^5 + 640*a^19*b^4*d^5 + 64*a^21*b^2*d^5) - 160*a^3*b^19*d^4
- 128*a^5*b^17*d^4 - 32*a*b^21*d^4 + 3136*a^9*b^13*d^4 + 4928*a^11*b^11*d^4 + 4480*a^13*b^9*d^4 + 2432*a^15*b^
7*d^4 + 736*a^17*b^5*d^4 + 96*a^19*b^3*d^4)) + 96*a^6*b^13*d^2 + 240*a^8*b^11*d^2 + 320*a^10*b^9*d^2 + 240*a^1
2*b^7*d^2 + 96*a^14*b^5*d^2 + 16*a^16*b^3*d^2)*(-(4*a^7*d^2 - (320*a^6*b^8*d^4 - 16*a^4*b^10*d^4 - 1760*a^8*b^
6*d^4 + 1600*a^10*b^4*d^4 - 400*a^12*b^2*d^4)^(1/2) + 20*a^3*b^4*d^2 - 40*a^5*b^2*d^2)/(16*a^10*d^4 + 16*b^10*
d^4 + 80*a^2*b^8*d^4 + 160*a^4*b^6*d^4 + 160*a^6*b^4*d^4 + 80*a^8*b^2*d^4))^(1/2) + (log(((((320*a^2*b^12*d^4
- 16*b^14*d^4 - 1760*a^4*b^10*d^4 + 1600*a^6*b^8*d^4 - 400*a^8*b^6*d^4)^(1/2) + 20*a*b^6*d^2 - 40*a^3*b^4*d^2
+ 4*a^5*b^2*d^2)/(a^10*d^4 + b^10*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b^4*d^4 + 5*a^8*b^2*d^4))^(1/2
)*(((((320*a^2*b^12*d^4 - 16*b^14*d^4 - 1760*a^4*b^10*d^4 + 1600*a^6*b^8*d^4 - 400*a^8*b^6*d^4)^(1/2) + 20*a*b
^6*d^2 - 40*a^3*b^4*d^2 + 4*a^5*b^2*d^2)/(a^10*d^4 + b^10*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b^4*d^
4 + 5*a^8*b^2*d^4))^(1/2)*(96*a*b^21*d^4 + 736*a^3*b^19*d^4 + 2432*a^5*b^17*d^4 + 4480*a^7*b^15*d^4 + 4928*a^9
*b^13*d^4 + 3136*a^11*b^11*d^4 + 896*a^13*b^9*d^4 - 128*a^15*b^7*d^4 - 160*a^17*b^5*d^4 - 32*a^19*b^3*d^4 - ((
((320*a^2*b^12*d^4 - 16*b^14*d^4 - 1760*a^4*b^10*d^4 + 1600*a^6*b^8*d^4 - 400*a^8*b^6*d^4)^(1/2) + 20*a*b^6*d^
2 - 40*a^3*b^4*d^2 + 4*a^5*b^2*d^2)/(a^10*d^4 + b^10*d^4 + 5*a^2*b^8*d^4 + 10*a^4*b^6*d^4 + 10*a^6*b^4*d^4 + 5
*a^8*b^2*d^4))^(1/2)*(a + b*cot(c + d*x))^(1/2)*(64*a*b^22*d^5 + 640*a^3*b^20*d^5 + 2880*a^5*b^18*d^5 + 7680*a
^7*b^16*d^5 + 13440*a^9*b^14*d^5 + 16128*a^11*b^12*d^5 + 13440*a^13*b^10*d^5 + 7680*a^15*b^8*d^5 + 2880*a^17*b
^6*d^5 + 640*a^19*b^4*d^5 + 64*a^21*b^2*d^5))/4))/4 - (a + b*cot(c + d*x))^(1/2)*(320*a^4*b^16*d^3 - 16*b^20*d
^3 + 1024*a^6*b^14*d^3 + 1440*a^8*b^12*d^3 + 1024*a^10*b^10*d^3 + 320*a^12*b^8*d^3 - 16*a^16*b^4*d^3)))/4 - 8*
b^19*d^2 - 40*a^2*b^17*d^2 - 72*a^4*b^15*d^2 - 40*a^6*b^13*d^2 + 40*a^8*b^11*d^2 + 72*a^10*b^9*d^2 + 40*a^12*b
^7*d^2 + 8*a^14*b^5*d^2)*(((320*a^2*b^12*d^4 - ...

________________________________________________________________________________________